package com.anquing.validator;

import com.anquing.model.Hello;
import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;


public class HelloValidator extends Validator {

    @Override
    protected void validate(Controller controller) {
        validateRequiredString("Hello.world", "worldMsg", "请输入问候语");
    }

    @Override
    protected void handleError(Controller controller) {
        controller.keepModel(Hello.class);
    }
}
